package com.shop2cn.iapi.livebuyer.service;

import java.util.ArrayList;

import com.google.gson.reflect.TypeToken;
import com.ymatou.iapi.livebuyer.parameter.LiveRoomInfo;
import com.ymt.base.YmatouBaseCall;
import com.ymt.core.tool.FormatUtil;
import com.ymt.core.tool.Logger;
import com.ymttest.utils.EnvSetup;
/**
*买手主页露出互动直播信息
*FreeMaker Template自动生成代码
*/
public class QueryBySellerHomeCall extends YmatouBaseCall{
	private static String opurl ="api/QueryBySellerHome";
	
	public QueryBySellerHomeCall() {
		super(EnvSetup.getSystemUrl("livebuyer_iapi_shop2cn"),opurl,"POST","JSON");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	public LiveRoomInfo getLiveRoomInfo()
    {
		LiveRoomInfo data = null;
        try {
        	String liveroominfo=getJsonObject().get("data").getAsJsonObject().toString();
        	data=(LiveRoomInfo) FormatUtil.GSONToObject(liveroominfo, LiveRoomInfo.class);
        } catch (Exception e) {
            Logger.debug("data not found ："+e.getMessage());
        }
        return data;
    }
}